home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
DJGPP
/
QDDVX102.ZIP
/
contrib
/
dvx
/
docs
/
qmake.doc
< prev
next >
Wrap
Text File
|
1993-07-15
|
6KB
|
156 lines
qmake - maintain, update, and regenerate groups of programs
Syntax
------
qmake [-f makefile] [-hinpqrst] [macro=val ...] [target(s) ...]
Description
-----------
Qmake allows the developer to maintain, update, and regenerate
groups of computer programs. The following is a brief description
of all options and some special names:
-f, makefile Description file name. makefile is assumed to be
the name of a description file.
-h, Help. Prints syntax and valid parameters
-i, Ignore error codes returned by invoked commands. This mode is
entered if the fake target name .IGNORE appears in the
description file.
-n, No execute mode. Print commands, but do not execute them.
-p, Print out the complete set of macro definitions and target
descriptions.
-q, Question. The make command returns a zero or non-zero status
code depending on whether the target file is or is not
up-to-date.
-r, Do not use the built-in rules.
-s, Silent mode. Do not print command lines before executing.
This mode is also entered if the fake target name .SILENT appears
in the description file.
-t, Touch the target files (causing them to be up- to-date)
rather than issue the usual commands.
.DEFAULT, If a file must be made but there are no explicit
commands or relevant built-in rules, the commands associated with
the name .DEFAULT are used if it exists.
.PRECIOUS, Dependents of this target will not be removed when
quit or interrupt are hit.
.SILENT, Same effect as the -s option.
.IGNORE, Same effect as the -i option.
Qmake executes commands in makefile to update one or more target
names. Name is typically a program. If no -f option is present
makefile is taken as the default. An environment variable called
QMAKE can be used to specify the makefile name, e.g.
SET QMAKE=-f mscreal.
Qmake updates a target only if its dependents are newer than the
target. All prerequisite files of a target are added recursively
to the list of targets. makefile contains a sequence of entries
that specify dependencies. The first line of an entry is a blank-
separated, non-null list of targets, then a :, then a (possibly
null) list of prerequisite files or dependencies. Text following
a ; and all following lines that begin with a tab are shell
commands to be executed to update the target. The first non-empty
line that does not begin with a tab or # begins a new dependency
or macro definition. Shell commands may be continued across lines
with the <backslash><new-line> sequence. Everything printed by
qmake (except the initial tab) is passed directly to the command
shell as is.
Sharp (#) and new-line surround comments.
Commands returning non-zero status normally terminate qmake. If
the -i option is present, or the entry .IGNORE: appears in a
makefile, or the initial character sequence of the command
contains -, the error is ignored.
Environment
-----------
The makefile processed by qmake can be specified through an
environment variable called qmake. This is of the form:
SET QMAKE=-f filename
When qmake is invoked with no filename specified on the
commandline it checks for an environment variable. If this
variable exists, the file specified is used as the input file for
qmake.
Include Files
-------------
If the string include appears as the first seven letters of a
line in a makefile, and is followed by a blank or a tab, the rest
of the line is assumed to be a filename and will be read by the
current invocation, after substituting for any macros.
Macros
------
Entries of the form string1 = string2 are macro definitions.
string2 is defined as all characters up to a comment character or
an unescaped new-line. Subsequent appearances of
$(string1[:subst1=[subst2]]) are replaced by string2. The
parentheses are optional if a single character macro name is used
and there is no substitute sequence. The optional :subst1=subst2
is a substitute sequence. If it is specified, all non-overlapping
occurrences of subst1 in the named macro are replaced by subst2.
Strings (for the purposes of this type of substitution) are
delimited by blanks, tabs, new-line characters, and beginnings of
lines.
Internal Macros
---------------
There are six internally maintained macros that are useful for
writing rules for building targets.
$*. The macro $* stands for the filename part of the current
dependent with the suffix deleted. It is evaluated only for
inference rules.
$@. The $@ macro stands for the full target name of the current
target. It is evaluated only for explicitly named dependencies.
.DEFAULT rule. It is the module that is out-of-date with respect
to the target (i.e., the ``manufactured'' dependent file name).
Thus, in the .c.obj rule, the
.c.obj:
cl -c $*.c
or:
.c.obj:
cl -c $
$?. The $? macro is evaluated when explicit rules from the
makefile are evaluated. It is the list of prerequisites that are
out-of-date with respect to the target; essentially, those
modules which must be rebuilt.
~. The ~ macro stands for your the HOME directory. It is
evaluated to the environment variable HOME. If it is not set and
your are in DESQview/X it is evaluated to the DESQview/X
directory (e.g. c:\dvx).
($). The ($) macro will pick-up any environment variable. (e.g.
($HOME) is equivelent to ~ and ($COMPILER_PATH) would probably
become c:\djgpp\bin.